import BTTree from 'db://app-game/libs/math/behavior-tree/base/BTTree';
import CompositeSequence from 'db://app-game/libs/math/behavior-tree/biz/composite/CompositeSequence';
import ActionMonsterAttack from '../action/ActionMonsterAttack';
import ActionMonsterMoveTo from '../action/ActionMonsterMoveTo';
import ActionMonsterMoveToHomeBase from '../action/ActionToHomeBase';
import ConditionalMonsterAttack from '../conditional/ConditionalMonsterAttack';
import ConditionalMonsterCircleMonitor from '../conditional/ConditionalMonsterCircleMonitor';

/** 怪兽行为树 */
export default class LittleMonsterBTTree extends BTTree {
  constructor() {
    super();
    this.init();
  }
  init() {
    this.root = new CompositeSequence([
      new CompositeSequence([new ConditionalMonsterAttack(), new ActionMonsterAttack()]),
      new CompositeSequence([new ConditionalMonsterCircleMonitor(), new ActionMonsterMoveTo()]),
      new ActionMonsterMoveToHomeBase(),
    ]);
  }
}
